<?php

use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class CreateTOrderTables extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        

        Schema::create('t_order', function (Blueprint $table) {
            $table->increments('id') -> comment('ID');
            $table->string('order_num') -> comment('订单编号');
            $table->bigInteger('gid') -> comment('商品id');
            $table->bigInteger('info_id') -> comment('收货信息id');
            $table->bigInteger('count') -> default(1) -> comment('商品数量');
            $table->bigInteger('uid') -> comment('用户id');
            $table->tinyInteger('order_status') -> default(0) -> comment('订单状态');
            $table->tinyInteger('bill') -> default(0) -> comment('是否有发票');
            $table->tinyInteger('shipping_status') -> default(0) -> comment('配送状态');
            $table->tinyInteger('pay_status') -> default(0) -> comment('支付状态');
            $table->string('postscript') -> default('') -> comment('备注');
            $table->tinyInteger('shipping_name') -> default(0) -> comment('商品配送方式');
            $table->tinyInteger('pay_name') -> default(0) -> comment('支付方式');
            $table->bigInteger('add_time') -> comment('下单时间');
            $table->bigInteger('confirm_time') -> comment('确认时间');
            $table->bigInteger('pay_time') -> comment('支付时间');
            $table->bigInteger('shipping_time') -> comment('发货时间');
        });
}

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
         Schema::drop('t_order');
    }
}
